﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using Ymca.Web.Resources;

namespace Ymca.Web.Models.Account
{
    public class LoginViewModel
    {
        private const string _usernamePattern = @"[A-Za-z0-9]+(?:[@. _-][A-Za-z0-9]+)*";

        [Key]
        [Display(Name="User name")]
        [Required()]
        [StringLength(60, MinimumLength=3)]
        [RegularExpression(_usernamePattern)]
        public string Username { get; set; }

        [Display(Name="Password")]
        [Required()]
        [StringLength(60, MinimumLength=6)]
        public string Password { get; set; }

        [Display(Name = "Remember Me")]
        public bool RememberMe { get; set; }
    }
}